package com.shiro.demo.entity;

import java.io.Serializable;
import java.util.List;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class SysRole implements Serializable{
    
    private static final long serialVersionUID = 1L;
    
    private Integer roleId; // 编号
    private String role; // 角色标识程序中判断使用,如"admin",这个是唯一的:
    private String description; // 角色描述,UI界面显示使用
    private Boolean available = Boolean.TRUE; // 是否可用,如果不可用将不会添加给用户
    private List<SysPermission> permissions;
    private List<User> users;// 一个角色对应多个用户
    
    @Override
    public String toString() {
        return "SysRole{\"roleId\":\"" + roleId + "\",\"role\":\"" + role + "\",\"description\":\"" + description
                + "\",\"available\":\"" + available + "\",\"permissions\":\"" + permissions + "\",\"users\":\"" + users
                + "\"} ";
    }
    
    
}
